package cn.edu.scau.cmi.hekaimin.simpleFactoryMethod;

public class InsuranceFactory {
	
	public static Insurance getInsurance(String type) {
		
		switch(type) {
		   case "身体受伤": return new Injury();
		   case "汽车损坏": return new CarDamage();
		   case "人员伤亡": return new Casualty();
		   case "多种事故": return new Accidents();
		   default: return null;
		}
	}
}
